<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Detalles de la Reserva</title>
        <link rel="stylesheet" href="faces/css/pattern1.css" type="text/css">
    </head>
    <body>
        <!--f:view-->
            <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
        <h1>Detalles de la Reserva</h1>
        <h:form>
            <h:panelGrid columns="2">
                <h:outputText value="Identificador:"/>
                <h:outputText value="#{reserva.reserva.idReserva}" title="IdReserva" />
                <h:outputText value="Fecha Inicio:"/>
                <h:outputText value="#{reserva.reserva.fechaInicio}" title="FechaInicio" >
                    <f:convertDateTime type="DATE" pattern="dd/MM/yyyy" />
                </h:outputText>
                <h:outputText value="Hora Inicio:"/>
                <h:outputText value="#{reserva.reserva.horaInicio}" title="HoraInicio" >
                    <f:convertDateTime type="TIME" pattern="HH:mm" />
                </h:outputText>
                <h:outputText value="Fecha Fin:"/>
                <h:outputText value="#{reserva.reserva.fechaFin}" title="FechaFin" >
                    <f:convertDateTime type="DATE" pattern="dd/MM/yyyy" />
                </h:outputText>
                <h:outputText value="Hora Fin:"/>
                <h:outputText value="#{reserva.reserva.horaFin}" title="HoraFin" >
                    <f:convertDateTime type="TIME" pattern="HH:mm" />
                </h:outputText>
                <h:outputText value="Observacion:"/>
                <h:outputText value="#{reserva.reserva.observacion}" title="Observacion" />
                <h:outputText value="IdRecurso:"/>
                <h:panelGroup>
                    <h:outputText value=" #{reserva.reserva.idRecurso}"/>
                    <h:panelGroup rendered="#{reserva.reserva.idRecurso != null}">
                        <h:outputText value=" ("/>
                        <h:commandLink value="Ver" action="#{recurso.detailSetup}">
                            <f:param name="jsfcrud.currentReserva" value="#{reserva.asString[reserva.reserva]}"/>
                            <f:param name="jsfcrud.currentRecurso" value="#{recurso.asString[reserva.reserva.idRecurso]}"/>
                            <f:param name="jsfcrud.relatedController" value="reserva"/>
                            <f:param name="jsfcrud.relatedControllerType" value="controller.ReservaController"/>
                        </h:commandLink>
                        <h:outputText value=" | "/>
                        <h:commandLink value="Editar" action="#{recurso.editSetup}">
                            <f:param name="jsfcrud.currentReserva" value="#{reserva.asString[reserva.reserva]}"/>
                            <f:param name="jsfcrud.currentRecurso" value="#{recurso.asString[reserva.reserva.idRecurso]}"/>
                            <f:param name="jsfcrud.relatedController" value="reserva"/>
                            <f:param name="jsfcrud.relatedControllerType" value="controller.ReservaController"/>
                        </h:commandLink>
                        <h:outputText value=" | "/>
                        <h:commandLink value="Borrar" action="#{recurso.destroy}">
                            <f:param name="jsfcrud.currentReserva" value="#{reserva.asString[reserva.reserva]}"/>
                            <f:param name="jsfcrud.currentRecurso" value="#{recurso.asString[reserva.reserva.idRecurso]}"/>
                            <f:param name="jsfcrud.relatedController" value="reserva"/>
                            <f:param name="jsfcrud.relatedControllerType" value="controller.ReservaController"/>
                        </h:commandLink>
                        <h:outputText value=" )"/>
                    </h:panelGroup>
                </h:panelGroup>
                <h:outputText value="IdSolicitudReserva:"/>
                <h:panelGroup>
                    <h:outputText value=" #{reserva.reserva.idSolicitudReserva}"/>
                    <h:panelGroup rendered="#{reserva.reserva.idSolicitudReserva != null}">
                        <h:outputText value=" ("/>
                        <h:commandLink value="Ver" action="#{solicitudreserva.detailSetup}">
                            <f:param name="jsfcrud.currentReserva" value="#{reserva.asString[reserva.reserva]}"/>
                            <f:param name="jsfcrud.currentSolicitudreserva" value="#{solicitudreserva.asString[reserva.reserva.idSolicitudReserva]}"/>
                            <f:param name="jsfcrud.relatedController" value="reserva"/>
                            <f:param name="jsfcrud.relatedControllerType" value="controller.ReservaController"/>
                        </h:commandLink>
                        <h:outputText value=" | "/>
                        <h:commandLink value="Editar" action="#{solicitudreserva.editSetup}">
                            <f:param name="jsfcrud.currentReserva" value="#{reserva.asString[reserva.reserva]}"/>
                            <f:param name="jsfcrud.currentSolicitudreserva" value="#{solicitudreserva.asString[reserva.reserva.idSolicitudReserva]}"/>
                            <f:param name="jsfcrud.relatedController" value="reserva"/>
                            <f:param name="jsfcrud.relatedControllerType" value="controller.ReservaController"/>
                        </h:commandLink>
                        <h:outputText value=" | "/>
                        <h:commandLink value="Borrar" action="#{solicitudreserva.destroy}">
                            <f:param name="jsfcrud.currentReserva" value="#{reserva.asString[reserva.reserva]}"/>
                            <f:param name="jsfcrud.currentSolicitudreserva" value="#{solicitudreserva.asString[reserva.reserva.idSolicitudReserva]}"/>
                            <f:param name="jsfcrud.relatedController" value="reserva"/>
                            <f:param name="jsfcrud.relatedControllerType" value="controller.ReservaController"/>
                        </h:commandLink>
                        <h:outputText value=" )"/>
                    </h:panelGroup>
                </h:panelGroup>
                <h:outputText value="UsoretiroCollection:" />
                <h:panelGroup>
                    <h:outputText rendered="#{empty reserva.reserva.usoretiroCollection}" value="(No hay elementos)"/>
                    <h:dataTable value="#{reserva.reserva.usoretiroCollection}" var="item" 
                                 border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_oddrow,jsfcrud_evenrow" rules="all" style="border:solid 1px" 
                                 rendered="#{not empty reserva.reserva.usoretiroCollection}">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Id Uso/Retiro"/>
                            </f:facet>
                            <h:outputText value=" #{item.idUsoRetiro}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Fecha de Uso"/>
                            </f:facet>
                            <h:outputText value="#{item.fechaUso}">
                                <f:convertDateTime type="DATE" pattern="dd/MM/yyyy" />
                            </h:outputText>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Hora de Uso"/>
                            </f:facet>
                            <h:outputText value="#{item.horaUso}">
                                <f:convertDateTime type="TIME" pattern="HH:mm" />
                            </h:outputText>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Id Operador"/>
                            </f:facet>
                            <h:outputText value=" #{item.idOperador}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Observacion"/>
                            </f:facet>
                            <h:outputText value=" #{item.observacion}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Id Reserva"/>
                            </f:facet>
                            <h:outputText value=" #{item.idReserva}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Id Ubicacion"/>
                            </f:facet>
                            <h:outputText value=" #{item.idUbicacion}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText escape="false" value="&nbsp;"/>
                            </f:facet>
                            <h:commandLink value="Ver" action="#{usoretiro.detailSetup}">
                                <f:param name="jsfcrud.currentReserva" value="#{reserva.asString[reserva.reserva]}"/>
                                <f:param name="jsfcrud.currentUsoretiro" value="#{usoretiro.asString[item]}"/>
                                <f:param name="jsfcrud.relatedController" value="reserva" />
                                <f:param name="jsfcrud.relatedControllerType" value="controller.ReservaController" />
                            </h:commandLink>
                            <h:outputText value=" "/>
                            <h:commandLink value="Editar" action="#{usoretiro.editSetup}">
                                <f:param name="jsfcrud.currentReserva" value="#{reserva.asString[reserva.reserva]}"/>
                                <f:param name="jsfcrud.currentUsoretiro" value="#{usoretiro.asString[item]}"/>
                                <f:param name="jsfcrud.relatedController" value="reserva" />
                                <f:param name="jsfcrud.relatedControllerType" value="controller.ReservaController" />
                            </h:commandLink>
                            <h:outputText value=" "/>
                            <h:commandLink value="Borrar" action="#{usoretiro.destroy}">
                                <f:param name="jsfcrud.currentReserva" value="#{reserva.asString[reserva.reserva]}"/>
                                <f:param name="jsfcrud.currentUsoretiro" value="#{usoretiro.asString[item]}"/>
                                <f:param name="jsfcrud.relatedController" value="reserva" />
                                <f:param name="jsfcrud.relatedControllerType" value="controller.ReservaController" />
                            </h:commandLink>
                        </h:column>
                    </h:dataTable>
                </h:panelGroup>
                <h:outputText value="Cancelacion Collection:" />
                <h:panelGroup>
                    <h:outputText rendered="#{empty reserva.reserva.cancelacionCollection}" value="(No hay elementos)"/>
                    <h:dataTable value="#{reserva.reserva.cancelacionCollection}" var="item" 
                                 border="0" cellpadding="2" cellspacing="0" rowClasses="jsfcrud_oddrow,jsfcrud_evenrow" rules="all" style="border:solid 1px" 
                                 rendered="#{not empty reserva.reserva.cancelacionCollection}">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Id Cancelacion"/>
                            </f:facet>
                            <h:outputText value=" #{item.idCancelacion}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Fecha Cancelacion"/>
                            </f:facet>
                            <h:outputText value="#{item.fechaCancelacion}">
                                <f:convertDateTime type="DATE" pattern="dd/MM/yyyy" />
                            </h:outputText>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Hora Cancelacion"/>
                            </f:facet>
                            <h:outputText value="#{item.horaCancelacion}">
                                <f:convertDateTime type="TIME" pattern="HH:mm" />
                            </h:outputText>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Observacion"/>
                            </f:facet>
                            <h:outputText value=" #{item.observacion}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Id Reserva"/>
                            </f:facet>
                            <h:outputText value=" #{item.idReserva}"/>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText escape="false" value="&nbsp;"/>
                            </f:facet>
                            <h:commandLink value="Ver" action="#{cancelacion.detailSetup}">
                                <f:param name="jsfcrud.currentReserva" value="#{reserva.asString[reserva.reserva]}"/>
                                <f:param name="jsfcrud.currentCancelacion" value="#{cancelacion.asString[item]}"/>
                                <f:param name="jsfcrud.relatedController" value="reserva" />
                                <f:param name="jsfcrud.relatedControllerType" value="controller.ReservaController" />
                            </h:commandLink>
                            <h:outputText value=" "/>
                            <h:commandLink value="Editar" action="#{cancelacion.editSetup}">
                                <f:param name="jsfcrud.currentReserva" value="#{reserva.asString[reserva.reserva]}"/>
                                <f:param name="jsfcrud.currentCancelacion" value="#{cancelacion.asString[item]}"/>
                                <f:param name="jsfcrud.relatedController" value="reserva" />
                                <f:param name="jsfcrud.relatedControllerType" value="controller.ReservaController" />
                            </h:commandLink>
                            <h:outputText value=" "/>
                            <h:commandLink value="Borrar" action="#{cancelacion.destroy}">
                                <f:param name="jsfcrud.currentReserva" value="#{reserva.asString[reserva.reserva]}"/>
                                <f:param name="jsfcrud.currentCancelacion" value="#{cancelacion.asString[item]}"/>
                                <f:param name="jsfcrud.relatedController" value="reserva" />
                                <f:param name="jsfcrud.relatedControllerType" value="controller.ReservaController" />
                            </h:commandLink>
                        </h:column>
                    </h:dataTable>
                </h:panelGroup>
            </h:panelGrid>
            <br />
            <h:commandLink action="#{reserva.destroy}" value="Borrar">
                <f:param name="jsfcrud.currentReserva" value="#{reserva.asString[reserva.reserva]}" />
            </h:commandLink>
            <br />
            <br />
            <h:commandLink action="#{reserva.editSetup}" value="Editar">
                <f:param name="jsfcrud.currentReserva" value="#{reserva.asString[reserva.reserva]}" />
            </h:commandLink>
            <br />
            <h:commandLink action="#{reserva.listSetup}" value="Mostrar Todas las Reservas"/>
        </h:form>
        <!--/f:view-->
    </body>
</html>
